<%@ page language="java" pageEncoding="ISO-8859-1"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<link href="../Admin-CSS/style.css" rel="stylesheet" type="text/css" />
<s:form theme="simple" method="post" id="form"
	action="updateCustomFieldsManager.htm">
	<table class="verdana12blacknormal" width="100%">
		<tbody>
			<tr>
				<td height="40" class="sectionheading bottom-border">
					Custom Fields Manager Form
				</td>
			</tr>
			<tr align="left">
				<td>
					<table border="0" cellpadding="0" cellspacing="0" width="100%">
						<tbody>
							<tr>
								<td colspan="3">
									<s:actionerror cssClass="note-red" />
									<s:actionmessage cssClass="note-red" />
									<s:fielderror cssClass="note-red" />
								</td>
							</tr>
							<tr>
								<td width="15%" align="left" valign="middle"
									class="verdana12blackNormal">
									Current language:
								</td>
								<td width="15%" align="left" valign="top">
									<s:hidden name="customFieldsFormats.id" value="%{customFieldsFormats.id}" theme="simple"></s:hidden>
									<s:select theme="simple" list="languagesList" name="customFieldsFormats.languageCode"
										listKey="languageCode" listValue="languageName"
										value="%{customFieldsFormats.languageCode}"></s:select>

								</td>
								<td width="70%" align="left" valign="top">
									<s:submit type="image" theme="simple" disabled="true"
										src="../Admin-Images/change-btn.gif" />
								</td>
							</tr>
						</tbody>
					</table>
					<s:if test="%{customFieldsFormats.id != null}">
						<table width="100%" cellpadding="0" cellspacing="0" border="0">
							<tbody>
								<tr>
									<td>
										<a href="#" class="navi-link">Custom Fields </a>&nbsp;&gt;
										<a href="#" class="navi-link"><s:property
												value="customFieldsFormats.format" /> &nbsp;&gt;</a>
										<span class="verdana11greynormal"> <s:property
												value="customFieldsFormats.field" /> </span>
									</td>
								</tr>
							</tbody>
						</table>
					</s:if>
					<table border="0" cellpadding="0" cellspacing="0" width="100%">
						<tbody>
							<tr>
								<td colspan="2" width="100%">
									<table>
										<tbody>
											<tr>
												<td width="17" class="verdana12blackNormal" align="right">
													Name:
												</td>
												<td width="83%">
													<s:textfield theme="simple" name="customFieldsFormats.name"
														cssClass="Textfiled-border" />
												</td>
											</tr>
											<tr>
												<td valign="top" class="verdana12blackNormal" align="right">
													Type:
												</td>
												<td>
													<s:select theme="simple"
														list="#{'Text Box':'Text Box','Text Area':'Text Area','Drop Down Menu':'Drop Down Menu','Check Boxes':'Check Boxes','Radio Buttons':'Radio Buttons'}"
														name="customFieldsFormats.type"
														cssClass="Textfiled-border"></s:select>
												</td>
											</tr>

											<tr>
												<td valign="top" class="verdana12blackNormal" align="right">
													Data:
												</td>
												<td>
													<s:select theme="simple"
														list="#{'Integer':'Integer','Decimal':'Decimal','Alpha':'Alpha','Text':'Text','HTML':'HTML','Email':'Email','URL':'URL'}"></s:select>
												</td>
											</tr>

											<tr>
												<td valign="top" class="verdana12blackNormal" align="right">
													Active:
												</td>
												<td>
													<s:checkbox name="customFieldsFormats.active"
														theme="simple" cssClass="Textfiled-border" />
												</td>
											</tr>
											<tr>
												<td valign="top" class="verdana12blackNormal" align="right">
													Required:
												</td>
												<td>
													<s:checkbox name="customFieldsFormats.required"
														theme="simple" cssClass="Textfiled-border" />
												</td>
											</tr>

											<tr>
												<td valign="top" class="verdana12blackNormal" align="right">
													Searchable:
												</td>
												<td>
													<s:checkbox name="customFieldsFormats.searchable"
														theme="simple" cssClass="Textfiled-border" />
												</td>
											</tr>
											<tr>
												<td valign="top" class="verdana12blackNormal" align="right">
													Multiple select:
												</td>
												<td>
													<s:checkbox name="customFieldsFormats.multiSelect"
														theme="simple" cssClass="Textfiled-border" />
												</td>
											</tr>
											<tr>
												<td valign="top" class="verdana12blackNormal" align="right">
													Maximum selections:
												</td>
												<td>
													<s:textfield theme="simple"
														name="customFieldsFormats.maxSelect"
														cssClass="Textfiled-border"></s:textfield>
												</td>
											</tr>
											<!------------------------------------------------------------------------------------>
											<tr>
												<td valign="top" class="verdana12blackNormal" align="right">
													Defaults:
												</td>

												<td class="verdana12blackNormal">
													<s:textfield theme="simple"
														name="customFieldsFormats.defaults"
														cssClass="Textfiled-border"></s:textfield>
													Separat by "|" char.
												</td>
											</tr>

											<tr>
												<td valign="top" class="verdana12blackNormal" align="right">
													Selections:
												</td>
												<td class="verdana12blackNormal">
													<s:textarea theme="simple" rows="6" cols="60"
														name="customFieldsFormats.selections"
														cssClass="Textfiled-border" />
													<br>
													For Menus, Radio Buttons, Checkboxes:
													Value1:Label1|Value2:Label2|Value3:Label3...
													<br>
												</td>

											</tr>
											<!------------------------------------------------------------------------------------>
											<tr>
												<td valign="top" class="verdana12blackNormal" align="right">
													Listing Columns:
												</td>
												<td>
													<s:textfield theme="simple"
														name="customFieldsFormats.listingColumns"
														cssClass="Textfiled-border" />
												</td>
											</tr>
											<tr>
												<td valign="top" class="verdana12blackNormal" align="right">
													Listing Row Start:
												</td>

												<td>
													<s:textarea theme="simple"
														name="customFieldsFormats.listingRowStart" rows="2"
														cols="60" cssClass="Textfiled-border" />
												</td>
											</tr>
											<tr>
												<td valign="top" class="verdana12blackNormal" align="right">
													Listing Line:
												</td>
												<td>
													<s:textarea theme="simple"
														name="customFieldsFormats.listingLine" rows="4" cols="60"
														cssClass="Textfiled-border" />
												</td>
											</tr>
											<tr>
												<td valign="top" class="verdana12blackNormal" align="right">
													Listing Row End:
												</td>
												<td>
													<s:textarea theme="simple"
														name="customFieldsFormats.listingRowEnd" rows="2"
														cols="60" cssClass="Textfiled-border" />
												</td>

											</tr>
											<tr>
												<td valign="top" class="verdana12blackNormal" align="right">
													Listing Empty Line:
												</td>
												<td>
													<s:textarea theme="simple"
														name="customFieldsFormats.listingEmpty" rows="2" cols="60"
														cssClass="Textfiled-border" />
												</td>
											</tr>
											<tr>
												<td valign="top" class="verdana12blackNormal" align="right">
													Listing Form:
												</td>
												<td>
													<s:textarea theme="simple"
														name="customFieldsFormats.listingForm" rows="6" cols="60"
														cssClass="Textfiled-border" />
												</td>
											</tr>
											<!------------------------------------------------------------------------------------>
											<tr>
												<td valign="top" class="verdana12blackNormal" align="right">
													Preview Columns:
												</td>
												<td>
													<s:textfield theme="simple"
														name="customFieldsFormats.previewColumns"
														cssClass="Textfiled-border" />
												</td>
											</tr>
											<tr>
												<td valign="top" class="verdana12blackNormal" align="right">
													Preview Row Start:
												</td>
												<td>
													<s:textarea theme="simple"
														name="customFieldsFormats.previewRowStart" rows="2"
														cols="60" cssClass="Textfiled-border" />
												</td>
											</tr>
											<tr>
												<td valign="top" class="verdana12blackNormal" align="right">
													Preview Line:
												</td>
												<td>
													<s:textarea theme="simple"
														name="customFieldsFormats.previewLine" rows="4" cols="60"
														cssClass="Textfiled-border" />
												</td>
											</tr>
											<tr>
												<td valign="top" class="verdana12blackNormal" align="right">
													Preview Row End:
												</td>
												<td>
													<s:textarea theme="simple"
														name="customFieldsFormats.previewRowEnd" rows="2"
														cols="60" cssClass="Textfiled-border" />
												</td>
											</tr>

											<tr>
												<td valign="top" class="verdana12blackNormal" align="right">
													Preview Empty Line:
												</td>
												<td>
													<s:textarea theme="simple"
														name="customFieldsFormats.previewEmpty" rows="2" cols="60"
														cssClass="Textfiled-border" />
												</td>
											</tr>
											<tr>
												<td valign="top" class="verdana12blackNormal" align="right">
													Preview Form:
												</td>
												<td>
													<s:textarea theme="simple"
														name="customFieldsFormats.previewForm" rows="6" cols="60"
														cssClass="Textfiled-border" />
												</td>
											</tr>
											<!------------------------------------------------------------------------------------>
											<tr>
												<td valign="top" class="verdana12blackNormal" align="right">
													View Columns:
												</td>
												<td>
													<s:textfield theme="simple"
														name="customFieldsFormats.viewColumns"
														cssClass="Textfiled-border" />
												</td>
											</tr>
											<tr>
												<td valign="top" class="verdana12blackNormal" align="right">
													View Row Start:
												</td>
												<td>
													<s:textarea theme="simple"
														name="customFieldsFormats.viewRowStart" rows="2" cols="60"
														cssClass="Textfiled-border" />
												</td>
											</tr>

											<tr>
												<td valign="top" class="verdana12blackNormal" align="right">
													View Line:
												</td>
												<td>
													<s:textarea theme="simple"
														name="customFieldsFormats.viewLine" rows="2" cols="60"
														cssClass="Textfiled-border" />
												</td>
											</tr>
											<tr>
												<td valign="top" class="verdana12blackNormal" align="right">
													View Row End:
												</td>
												<td>
													<s:textarea theme="simple"
														name="customFieldsFormats.viewRowEnd" rows="2" cols="60"
														cssClass="Textfiled-border" />
												</td>
											</tr>
											<tr>
												<td valign="top" class="verdana12blackNormal" align="right">
													View Empty Line:
												</td>

												<td>
													<s:textarea theme="simple"
														name="customFieldsFormats.viewEmpty" rows="2" cols="60"
														cssClass="Textfiled-border" />
												</td>
											</tr>
											<tr>
												<td valign="top" class="verdana12blackNormal" align="right">
													View Form:
												</td>
												<td>
													<s:textarea theme="simple"
														name="customFieldsFormats.viewForm" rows="6" cols="60"
														cssClass="Textfiled-border" />
												</td>
											</tr>
											<!------------------------------------------------------------------------------------>
											<tr>
												<td class="verdana12blackNormal" align="right">
													Search Columns:
												</td>
												<td>
													<s:textfield theme="simple"
														name="customFieldsFormats.searchColumns"
														cssClass="Textfiled-border" />
												</td>
											</tr>
											<tr>
												<td valign="top" class="verdana12blackNormal" align="right">
													Search Row Start:
												</td>
												<td>
													<s:textarea theme="simple"
														name="customFieldsFormats.searchRowStart" rows="2"
														cols="60" cssClass="Textfiled-border" />
												</td>
											</tr>
											<tr>
												<td valign="top" class="verdana12blackNormal" align="right">
													Search Line:
												</td>

												<td>
													<s:textarea theme="simple"
														name="customFieldsFormats.searchLine" rows="4" cols="60"
														cssClass="Textfiled-border" />
												</td>
											</tr>
											<tr>
												<td valign="top" class="verdana12blackNormal" align="right">
													Search Row End:
												</td>
												<td>
													<s:textarea theme="simple"
														name="customFieldsFormats.searchRowEnd" rows="2" cols="60"
														cssClass="Textfiled-border" />
												</td>
											</tr>
											<tr>
												<td valign="top" class="verdana12blackNormal" align="right">
													Search Empty Line:
												</td>
												<td>
													<s:textarea theme="simple"
														name="customFieldsFormats.searchEmpty" rows="2" cols="60"
														cssClass="Textfiled-border" />
												</td>

											</tr>
											<tr>
												<td valign="top" class="verdana12blackNormal" align="right">
													Search Form:
												</td>
												<td>
													<s:textarea theme="simple"
														name="customFieldsFormats.searchForm" rows="2" cols="60"
														cssClass="Textfiled-border" />
												</td>
											</tr>
											<!------------------------------------------------------------------------------------>
											<tr>
												<td valign="top" class="verdana12blackNormal" align="right">
													Error message:
												</td>

												<td>
													<s:textarea theme="simple" name="customFieldsFormats.error"
														rows="3" cols="60" cssClass="Textfiled-border" />
												</td>
											</tr>
											<!------------------------------------------------------------------------------------>
											<tr>
												<td colspan="2" align="center">
													<s:submit type="image" theme="simple"
														src="../Admin-Images/save-chagnes-button.gif" />
													<img src="../Admin-Images/reset-button.gif" alt="Reset"
														style="cursor: pointer;"
														onclick="document.getElementById('form').reset();" />
												</td>
											</tr>

										</tbody>
									</table>
								</td>
							</tr>
						</tbody>
					</table>
					<br>
					<table border="0" cellpadding="0" cellspacing="0" width="100%">
						<tbody>
							<tr>
								<td align="left" class="verdana12blackNormal">
									<b>Copy Field From</b>
								</td>
							</tr>
						</tbody>
					</table>

					<table>
						<tbody>
							<tr>
								<td width="100%">
									<table>
										<tbody>
											<tr>
												<td colspan="6" class="verdana12blackNormal">
													Copy selectd field information to field <s:property value="customFieldsFormats.field"/>. This process
													will overwrite current field.
												</td>
											</tr>
											<tr></tr>
											<tr>
												<td class="verdana12blackNormal" align="left">
													Copy From Format:
												</td>
												<td>
													<s:select theme="simple" cssClass="Textfiled-border"
														list="customFieldsFormatsList" listKey="id"
														listValue="format"></s:select>
												</td>
												<td class="verdana12blackNormal" align="left">
													Language:
												</td>
												<td>
													<s:select theme="simple" list="languagesList"
														listKey="languageCode" listValue="languageName" name="languageCode"></s:select>
												</td>

												<td class="verdana12blackNormal" align="left">
													Field:
												</td>
												<td>
													<s:select theme="simple" cssClass="Textfiled-border"
														list="customFieldsFormatsList" listKey="id"
														listValue="field" name="newFormat"></s:select>
												</td>
											</tr>
											<tr>
												<td colspan="6" align="center">
													<s:submit type="image" theme="simple" disabled="true"
														src="../Admin-Images/copy-btn.gif" />
													<img src="../Admin-Images/reset-button.gif" alt="Reset"
														style="cursor: pointer;"
														onclick="document.getElementById('form').reset();" />
												</td>
											</tr>
										</tbody>
									</table>
								</td>
							</tr>
						</tbody>
					</table>
				</td>
			</tr>
		</tbody>
	</table>
</s:form>